@extends('layouts.buz.layout')
@section('content')

    <div id="sidebar" class="collapse navbar-collapse col-md-2 col-sm-3">
        <!-- Start .sidebar-inner -->
        <div class="sidebar-inner">
            <div class="commonMoeny">
                <h4 class="ktimoney">
                    可提现金额<br>
                    <em class="red">￥782.00</em>
                </h4>
                <h4 class="ktimoney">
                    账户余额<br>
                    <em class="red">￥782.00</em>
                </h4>
                <h4 class="ktimoney">
                    结算中金额<br>
                    <em class="red">￥782.00</em>
                </h4>
                <h4 class="ktimoney ">
                    累计已计算金额<br>
                    <em class="red">￥782.00</em>
                </h4>
            </div>

            <ul id="sideNav" class="nav nav-pills nav-stacked">
                <li >
                    <a href="/remit/topay">
                        <div class="col-sm-9">
                            <h4>代付</h4>
                        </div>
                        <div class="col-sm-3">
                            <i class="arrowW"></i>
                        </div>
                    </a>
                </li>
                <li class="on">
                    <a href="/remit/topayList">
                        <div class="col-sm-9">
                            <h4>代付记录</h4>
                        </div>
                        <div class="col-sm-3">
                            <i class="arrowH"></i>
                        </div>
                    </a>
                </li>
                <li>
                    <a href="/remit/withdraw">
                        <div class="col-sm-9">
                            <h4>提现</h4>
                        </div>
                        <div class="col-sm-3">
                            <i class="arrowH"></i>
                        </div>
                    </a>
                </li>
                <li>
                    <a href="/remit/withdrawList">
                        <div class="col-sm-9">
                            <h4>提现记录</h4>
                        </div>
                        <div class="col-sm-3">
                            <i class="arrowH"></i>
                        </div>
                    </a>
                </li>
            </ul>
        </div>
        <!-- End .sidebar-inner -->
    </div>

    <div class="yhy-member col-sm-9 col-sm-push-3 col-md-10 col-md-push-2 col-xs-12">
        <h4 class="labatx">
            <img src="{{asset('image/laba.png')}}" width="50px" height="50px" />
            各位商户，0:00-2:00为银行系统升级维护时间，为保证您资金能成功提现或代付，建议您在2:00以后进行此类操作
        </h4>
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title">
                    历史数据
                </h4>
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-sm-3 lineH28">
                        <div class="form-group">
                            <label for="lastname" class="col-sm-2 control-label padd">提现时间</label>
                            <div class="col-sm-10 padd">
                                <input size="16" type="text"  id="starttime" class="form_datetime form-control" style="width: 49%;">
                                <input size="16" type="text" id="endtime" class="form_datetime form-control" style="width: 49%;">
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-3 lineH28">
                        <div class="col-sm-5">
                            <div class="form-group">
                                <label for="lastname" class="col-sm-4 padd control-label">种类</label>
                                <div class="col-sm-8 padd">
                                    <select class="form-control">
                                        <option>全部</option>
                                        <option>提现</option>
                                        <option>代付</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="col-sm-7">
                            <div class="form-group">
                                <label for="lastname" class="col-sm-4 padd control-label">订单状态</label>
                                <div class="col-sm-8 padd">
                                    <select class="form-control">
                                        <option>所有</option>
                                        <option>待结算/复核</option>
                                        <option>已结算</option>
                                        <option>已撤销</option>
                                        <option>已退回</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-3 lineH28">
                        <div class="form-group">
                            <div class="col-sm-3 padd">
                                <button type="button" class="btn btn-primary" id="search">查询</button>
                            </div>
                            <div class="col-sm-3 padd">
                                <button type="button" class="btn btn-primary" id="daochu">导出</button>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="historyList">
                    <table class="table table-striped table-bordered">
                        <thead>
                        <tr>
                            <th width="2%"></th>
                            <th >提现时间</th>
                            <th >姓名</th>
                            <th >账号</th>
                            <th >银行</th>
                            <th >分行</th>
                            <th >省份</th>
                            <th >城市</th>
                            <th >商家实收</th>
                            <th >处理时间</th>
                            <th >状态</th>
                            <th >种类</th>
                            <th >出款通道</th>
                            <th >操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td class="addcolor" data-id = "123564565455654565" data-i="0">+</td>
                            <td>2017-10-18 10:50:45</td>
                            <td>李潇潇</td>
                            <td>123564565455654565</td>
                            <td>中国建设银行</td>
                            <td>沙坪坝支行</td>
                            <td>广西壮族自治区</td>
                            <td>重庆市</td>
                            <td>2135.325</td>
                            <td>2017-10-18 10:25:30</td>
                            <td>已结算</td>
                            <td>代付</td>
                            <td></td>
                            <td><a href="#">删除</a></td>
                        </tr>
                        <tr class="ativeTr" data-id="123564565455654565">
                            <td></td>
                            <td></td>
                            <td>李潇潇</td>
                            <td>123564565455654565</td>
                            <td>中国建设银行</td>
                            <td>沙坪坝支行</td>
                            <td>广西壮族自治区</td>
                            <td>重庆市</td>
                            <td>2135.325</td>
                            <td>2017-10-18 10:25:30</td>
                            <td>已结算</td>
                            <td>代付</td>
                            <td>lafjkdfjkdsj</td>
                            <td></td>
                        </tr>
                        <tr class="ativeTr" data-id="123564565455654565">
                            <td></td>
                            <td></td>
                            <td>李潇潇</td>
                            <td>123564565455654565</td>
                            <td>中国建设银行</td>
                            <td>沙坪坝支行</td>
                            <td>广西壮族自治区</td>
                            <td>重庆市</td>
                            <td>2135.325</td>
                            <td>2017-10-18 10:25:30</td>
                            <td>已结算</td>
                            <td>代付</td>
                            <td>lafjkdfjkdsj</td>
                            <td></td>
                        </tr>
                        </tbody>
                        <tbody>
                        <tr>
                            <td>本页小计</td>
                            <td colspan="13">33333</td>
                        </tr>
                        <tr>
                            <td>合计</td>
                            <td colspan="13">33333</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
@endsection()

@section('bottom_js')
    <script>

        //时间
        $(".form_datetime").datetimepicker({
            language: 'zh-CN',
            format: "yyyy-mm-dd hh:ii",
            autoclose: true,
            todayBtn: true,
            minView: 1,
            inline: true
        });
        //查询
        $("#forgetNext").click(function(){
            //判断时间
            var starttime=$("#starttime").val();
            var endtime=$("#endtime").val();
            if(starttime==null||endtime==null){
                //setTimeout(function () {
                $('#myModal').modal('show').find(".modal-body").html("时间不能为空");
                //}, 230);
                return false;
            }
            //判断时间的大小
            var ts1 = Date.parse(starttime.replace(/-/g, '/ '));
            var ts2 = Date.parse(endtime.replace(/-/g, '/ '));
            var ts = ts2-ts1;
            console.log(ts);
            if(ts<=0){
                $('#myModal').modal('show').find(".modal-body").html("截止时间小于开始时间，请重新选择！");
                return false;
            }
        });
        //展开
        $(".historyList .addcolor").click(function(){
            var self=$(this);
            var i=self.attr("data-i");
            var id=self.attr("data-id");
            if(i==0){//展开
                $(".ativeTr[data-id="+id+"]").show();
                self.html("-");
                self.attr("data-i",1);

            }else{
                $(".ativeTr[data-id="+id+"]").hide();
                self.html("+");
                self.attr("data-i",0);
            }
        });
    </script>
@endsection()